﻿namespace Sidvall.IdentityManager.Security.Entities
{
    [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Maintainability", "CA1506:AvoidExcessiveClassCoupling")]
    public sealed partial class AspNetUsers : global::Sidvall.Data.ServiceDataRowBase, global::Sidvall.IdentityManager.Data.IAspNetUsers
    {
        #region Public Members

        #region AccessFailedCount

        private int _AccessFailedCount;
        partial void OnBeforeAccessFailedCountPropertyChanged(Sidvall.Business.PropertyChangeEventData<int> eventData);
        partial void OnAfterAccessFailedCountPropertyChanged();
        public int AccessFailedCount
        { 
            get
            {
                return _AccessFailedCount;
            }
            set
            {
                if (this.BusinessSettings.EnabledBusinessEvents == Sidvall.Business.BusinessEvents.None)
                {
                    _AccessFailedCount = value;
                }
                else
                {
                    Sidvall.Business.PropertyChangeEventData<int> eventData = new Sidvall.Business.PropertyChangeEventData<int>(value, _AccessFailedCount);
                    OnBeforeAccessFailedCountPropertyChanged(eventData);
                    if (!eventData.Cancel)
                    {
                        LoadInstanceField("AccessFailedCount", eventData.Value, true, true);
                        OnAfterAccessFailedCountPropertyChanged();
                    }
                }
            }
        }

        #endregion
        #region Email

        private string _Email;
        partial void OnBeforeEmailPropertyChanged(Sidvall.Business.PropertyChangeEventData<string> eventData);
        partial void OnAfterEmailPropertyChanged();
        public string Email
        { 
            get
            {
                return _Email;
            }
            set
            {
                if (this.BusinessSettings.EnabledBusinessEvents == Sidvall.Business.BusinessEvents.None)
                {
                    _Email = value;
                }
                else
                {
                    Sidvall.Business.PropertyChangeEventData<string> eventData = new Sidvall.Business.PropertyChangeEventData<string>(value, _Email);
                    OnBeforeEmailPropertyChanged(eventData);
                    if (!eventData.Cancel)
                    {
                        LoadInstanceField("Email", eventData.Value, true, true);
                        OnAfterEmailPropertyChanged();
                    }
                }
            }
        }

        #endregion
        #region EmailConfirmed

        private bool _EmailConfirmed;
        partial void OnBeforeEmailConfirmedPropertyChanged(Sidvall.Business.PropertyChangeEventData<bool> eventData);
        partial void OnAfterEmailConfirmedPropertyChanged();
        public bool EmailConfirmed
        { 
            get
            {
                return _EmailConfirmed;
            }
            set
            {
                if (this.BusinessSettings.EnabledBusinessEvents == Sidvall.Business.BusinessEvents.None)
                {
                    _EmailConfirmed = value;
                }
                else
                {
                    Sidvall.Business.PropertyChangeEventData<bool> eventData = new Sidvall.Business.PropertyChangeEventData<bool>(value, _EmailConfirmed);
                    OnBeforeEmailConfirmedPropertyChanged(eventData);
                    if (!eventData.Cancel)
                    {
                        LoadInstanceField("EmailConfirmed", eventData.Value, true, true);
                        OnAfterEmailConfirmedPropertyChanged();
                    }
                }
            }
        }

        #endregion
        #region Id

        private string _Id;
        partial void OnBeforeIdPropertyChanged(Sidvall.Business.PropertyChangeEventData<string> eventData);
        partial void OnAfterIdPropertyChanged();
        public string Id
        { 
            get
            {
                return _Id;
            }
            set
            {
                if (this.BusinessSettings.EnabledBusinessEvents == Sidvall.Business.BusinessEvents.None)
                {
                    _Id = value;
                }
                else
                {
                    Sidvall.Business.PropertyChangeEventData<string> eventData = new Sidvall.Business.PropertyChangeEventData<string>(value, _Id);
                    OnBeforeIdPropertyChanged(eventData);
                    if (!eventData.Cancel)
                    {
                        LoadInstanceField("Id", eventData.Value, true, true);
                        OnAfterIdPropertyChanged();
                    }
                }
            }
        }

        #endregion
        #region LockoutEnabled

        private bool _LockoutEnabled;
        partial void OnBeforeLockoutEnabledPropertyChanged(Sidvall.Business.PropertyChangeEventData<bool> eventData);
        partial void OnAfterLockoutEnabledPropertyChanged();
        public bool LockoutEnabled
        { 
            get
            {
                return _LockoutEnabled;
            }
            set
            {
                if (this.BusinessSettings.EnabledBusinessEvents == Sidvall.Business.BusinessEvents.None)
                {
                    _LockoutEnabled = value;
                }
                else
                {
                    Sidvall.Business.PropertyChangeEventData<bool> eventData = new Sidvall.Business.PropertyChangeEventData<bool>(value, _LockoutEnabled);
                    OnBeforeLockoutEnabledPropertyChanged(eventData);
                    if (!eventData.Cancel)
                    {
                        LoadInstanceField("LockoutEnabled", eventData.Value, true, true);
                        OnAfterLockoutEnabledPropertyChanged();
                    }
                }
            }
        }

        #endregion
        #region LockoutEndDateUtc

        private System.Nullable<System.DateTime> _LockoutEndDateUtc;
        partial void OnBeforeLockoutEndDateUtcPropertyChanged(Sidvall.Business.PropertyChangeEventData<System.Nullable<System.DateTime>> eventData);
        partial void OnAfterLockoutEndDateUtcPropertyChanged();
        public System.Nullable<System.DateTime> LockoutEndDateUtc
        { 
            get
            {
                return _LockoutEndDateUtc;
            }
            set
            {
                if (this.BusinessSettings.EnabledBusinessEvents == Sidvall.Business.BusinessEvents.None)
                {
                    _LockoutEndDateUtc = value;
                }
                else
                {
                    Sidvall.Business.PropertyChangeEventData<System.Nullable<System.DateTime>> eventData = new Sidvall.Business.PropertyChangeEventData<System.Nullable<System.DateTime>>(value, _LockoutEndDateUtc);
                    OnBeforeLockoutEndDateUtcPropertyChanged(eventData);
                    if (!eventData.Cancel)
                    {
                        LoadInstanceField("LockoutEndDateUtc", eventData.Value, true, true);
                        OnAfterLockoutEndDateUtcPropertyChanged();
                    }
                }
            }
        }

        #endregion
        #region PasswordHash

        private string _PasswordHash;
        partial void OnBeforePasswordHashPropertyChanged(Sidvall.Business.PropertyChangeEventData<string> eventData);
        partial void OnAfterPasswordHashPropertyChanged();
        public string PasswordHash
        { 
            get
            {
                return _PasswordHash;
            }
            set
            {
                if (this.BusinessSettings.EnabledBusinessEvents == Sidvall.Business.BusinessEvents.None)
                {
                    _PasswordHash = value;
                }
                else
                {
                    Sidvall.Business.PropertyChangeEventData<string> eventData = new Sidvall.Business.PropertyChangeEventData<string>(value, _PasswordHash);
                    OnBeforePasswordHashPropertyChanged(eventData);
                    if (!eventData.Cancel)
                    {
                        LoadInstanceField("PasswordHash", eventData.Value, true, true);
                        OnAfterPasswordHashPropertyChanged();
                    }
                }
            }
        }

        #endregion
        #region PhoneNumber

        private string _PhoneNumber;
        partial void OnBeforePhoneNumberPropertyChanged(Sidvall.Business.PropertyChangeEventData<string> eventData);
        partial void OnAfterPhoneNumberPropertyChanged();
        public string PhoneNumber
        { 
            get
            {
                return _PhoneNumber;
            }
            set
            {
                if (this.BusinessSettings.EnabledBusinessEvents == Sidvall.Business.BusinessEvents.None)
                {
                    _PhoneNumber = value;
                }
                else
                {
                    Sidvall.Business.PropertyChangeEventData<string> eventData = new Sidvall.Business.PropertyChangeEventData<string>(value, _PhoneNumber);
                    OnBeforePhoneNumberPropertyChanged(eventData);
                    if (!eventData.Cancel)
                    {
                        LoadInstanceField("PhoneNumber", eventData.Value, true, true);
                        OnAfterPhoneNumberPropertyChanged();
                    }
                }
            }
        }

        #endregion
        #region PhoneNumberConfirmed

        private bool _PhoneNumberConfirmed;
        partial void OnBeforePhoneNumberConfirmedPropertyChanged(Sidvall.Business.PropertyChangeEventData<bool> eventData);
        partial void OnAfterPhoneNumberConfirmedPropertyChanged();
        public bool PhoneNumberConfirmed
        { 
            get
            {
                return _PhoneNumberConfirmed;
            }
            set
            {
                if (this.BusinessSettings.EnabledBusinessEvents == Sidvall.Business.BusinessEvents.None)
                {
                    _PhoneNumberConfirmed = value;
                }
                else
                {
                    Sidvall.Business.PropertyChangeEventData<bool> eventData = new Sidvall.Business.PropertyChangeEventData<bool>(value, _PhoneNumberConfirmed);
                    OnBeforePhoneNumberConfirmedPropertyChanged(eventData);
                    if (!eventData.Cancel)
                    {
                        LoadInstanceField("PhoneNumberConfirmed", eventData.Value, true, true);
                        OnAfterPhoneNumberConfirmedPropertyChanged();
                    }
                }
            }
        }

        #endregion
        #region SecurityStamp

        private string _SecurityStamp;
        partial void OnBeforeSecurityStampPropertyChanged(Sidvall.Business.PropertyChangeEventData<string> eventData);
        partial void OnAfterSecurityStampPropertyChanged();
        public string SecurityStamp
        { 
            get
            {
                return _SecurityStamp;
            }
            set
            {
                if (this.BusinessSettings.EnabledBusinessEvents == Sidvall.Business.BusinessEvents.None)
                {
                    _SecurityStamp = value;
                }
                else
                {
                    Sidvall.Business.PropertyChangeEventData<string> eventData = new Sidvall.Business.PropertyChangeEventData<string>(value, _SecurityStamp);
                    OnBeforeSecurityStampPropertyChanged(eventData);
                    if (!eventData.Cancel)
                    {
                        LoadInstanceField("SecurityStamp", eventData.Value, true, true);
                        OnAfterSecurityStampPropertyChanged();
                    }
                }
            }
        }

        #endregion
        #region TwoFactorEnabled

        private bool _TwoFactorEnabled;
        partial void OnBeforeTwoFactorEnabledPropertyChanged(Sidvall.Business.PropertyChangeEventData<bool> eventData);
        partial void OnAfterTwoFactorEnabledPropertyChanged();
        public bool TwoFactorEnabled
        { 
            get
            {
                return _TwoFactorEnabled;
            }
            set
            {
                if (this.BusinessSettings.EnabledBusinessEvents == Sidvall.Business.BusinessEvents.None)
                {
                    _TwoFactorEnabled = value;
                }
                else
                {
                    Sidvall.Business.PropertyChangeEventData<bool> eventData = new Sidvall.Business.PropertyChangeEventData<bool>(value, _TwoFactorEnabled);
                    OnBeforeTwoFactorEnabledPropertyChanged(eventData);
                    if (!eventData.Cancel)
                    {
                        LoadInstanceField("TwoFactorEnabled", eventData.Value, true, true);
                        OnAfterTwoFactorEnabledPropertyChanged();
                    }
                }
            }
        }

        #endregion
        #region UserName

        private string _UserName;
        partial void OnBeforeUserNamePropertyChanged(Sidvall.Business.PropertyChangeEventData<string> eventData);
        partial void OnAfterUserNamePropertyChanged();
        public string UserName
        { 
            get
            {
                return _UserName;
            }
            set
            {
                if (this.BusinessSettings.EnabledBusinessEvents == Sidvall.Business.BusinessEvents.None)
                {
                    _UserName = value;
                }
                else
                {
                    Sidvall.Business.PropertyChangeEventData<string> eventData = new Sidvall.Business.PropertyChangeEventData<string>(value, _UserName);
                    OnBeforeUserNamePropertyChanged(eventData);
                    if (!eventData.Cancel)
                    {
                        LoadInstanceField("UserName", eventData.Value, true, true);
                        OnAfterUserNamePropertyChanged();
                    }
                }
            }
        }

        #endregion
        #region DataRowContextStorageKey

        protected override string DataRowContextStorageKey
        {
            get
            {
                return global::Sidvall.IdentityManager.Security.SystemContext.Current.EntityFacade.AspNetUsersManager.GetKey(this);
            }
        }

        #endregion
        #region DataRowStateIsDirty

        protected override bool DataRowStateIsDirty
        {
            get
            {
                return global::Sidvall.IdentityManager.Security.SystemContext.Current.EntityFacade.AspNetUsersManager.DataRowStateIsDirty(this);
            }
        }

        #endregion
        
        [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
        public AspNetRolesCollectionItem AspNetRoles { get; set; }
        [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
        public AspNetUserClaimsCollectionItem AspNetUserClaims { get; set; }
        [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
        public AspNetUserLoginsCollectionItem AspNetUserLogins { get; set; }
        #region LoadAspNetUserClaims

        public void LoadAspNetUserClaims(AspNetUserClaimsCollectionItem value)
        {
            LoadInstanceField("AspNetUserClaims", value, true, false);
        }

        #endregion
        #region LoadAspNetUserLogins

        public void LoadAspNetUserLogins(AspNetUserLoginsCollectionItem value)
        {
            LoadInstanceField("AspNetUserLogins", value, true, false);
        }

        #endregion
        #region LoadAspNetUserClaimsAsync

        public async System.Threading.Tasks.Task<AspNetUserClaimsCollectionItem> LoadAspNetUserClaimsAsync()
        {
            return await LoadAspNetUserClaimsAsync(false, true, null, null, null).ConfigureAwait(false);
        }
        public async System.Threading.Tasks.Task<AspNetUserClaimsCollectionItem> LoadAspNetUserClaimsAsync(bool refresh, bool raisePropertyChanged, global::Sidvall.Data.FetchListCriteria<global::Sidvall.IdentityManager.Data.Fields.AspNetUserClaimsField, global::Sidvall.IdentityManager.Data.Relations.AspNetUserClaimsRelation> criteria, string strategyContext, global::Sidvall.Data.ObjectParameterCollection objectParameters)
        {
            await global::Sidvall.IdentityManager.Security.SystemContext.Current.DataPortal.AspNetUsersManager.LoadAspNetUserClaimsAsync(this, refresh, raisePropertyChanged, criteria, strategyContext, objectParameters).ConfigureAwait(false);

            return this.AspNetUserClaims;
        }

        #endregion
        #region LoadAspNetUserLoginsAsync

        public async System.Threading.Tasks.Task<AspNetUserLoginsCollectionItem> LoadAspNetUserLoginsAsync()
        {
            return await LoadAspNetUserLoginsAsync(false, true, null, null, null).ConfigureAwait(false);
        }
        public async System.Threading.Tasks.Task<AspNetUserLoginsCollectionItem> LoadAspNetUserLoginsAsync(bool refresh, bool raisePropertyChanged, global::Sidvall.Data.FetchListCriteria<global::Sidvall.IdentityManager.Data.Fields.AspNetUserLoginsField, global::Sidvall.IdentityManager.Data.Relations.AspNetUserLoginsRelation> criteria, string strategyContext, global::Sidvall.Data.ObjectParameterCollection objectParameters)
        {
            await global::Sidvall.IdentityManager.Security.SystemContext.Current.DataPortal.AspNetUsersManager.LoadAspNetUserLoginsAsync(this, refresh, raisePropertyChanged, criteria, strategyContext, objectParameters).ConfigureAwait(false);

            return this.AspNetUserLogins;
        }

        #endregion
        #region LoadInstanceField

        public void LoadInstanceField(string fieldName, object value, bool cascade, bool updateState)
        {
            global::Sidvall.IdentityManager.Security.SystemContext.Current.EntityFacade.AspNetUsersManager.LoadInstanceField(this, fieldName, value, cascade, false, updateState);
        }

        #endregion
        #region Copy

        public AspNetUsers Copy()
        {
            return global::Sidvall.IdentityManager.Security.SystemContext.Current.EntityFacade.AspNetUsersManager.Copy(this);
        }
        public AspNetUsers Copy(Sidvall.Data.CopySettings settings)
        {
            return global::Sidvall.IdentityManager.Security.SystemContext.Current.EntityFacade.AspNetUsersManager.Copy(this, settings);
        }

        #endregion
        #region Import

        public void Import(global::Sidvall.IdentityManager.Data.IAspNetUsers item)
        {
            global::Sidvall.IdentityManager.Security.SystemContext.Current.EntityFacade.AspNetUsersManager.Import(this, item);
        }
        public void Import(global::Sidvall.IdentityManager.Data.IAspNetUsers item, Sidvall.Data.CopySettings settings)
        {
            global::Sidvall.IdentityManager.Security.SystemContext.Current.EntityFacade.AspNetUsersManager.Import(this, item, settings);
        }

        #endregion
        #region SaveItemAsync

        public async System.Threading.Tasks.Task<AspNetUsers> SaveItemAsync()
        {
            return await global::Sidvall.IdentityManager.Security.SystemContext.Current.DataPortal.AspNetUsersManager.SaveItemAsync(this).ConfigureAwait(false);
        }
        public async System.Threading.Tasks.Task<AspNetUsers> SaveItemAsync(Sidvall.Data.SaveMode mode)
        {
            return await global::Sidvall.IdentityManager.Security.SystemContext.Current.DataPortal.AspNetUsersManager.SaveItemAsync(this, mode).ConfigureAwait(false);
        }
        public async System.Threading.Tasks.Task<AspNetUsers> SaveItemAsync(Sidvall.Data.SaveSettings settings)
        {
            return await global::Sidvall.IdentityManager.Security.SystemContext.Current.DataPortal.AspNetUsersManager.SaveItemAsync(this, settings).ConfigureAwait(false);
        }
        public async System.Threading.Tasks.Task<AspNetUsers> SaveItemAsync(Sidvall.Data.SaveSettings settings, string strategyContext, global::Sidvall.Data.ObjectParameterCollection objectParameters)
        {
            return await global::Sidvall.IdentityManager.Security.SystemContext.Current.DataPortal.AspNetUsersManager.SaveItemAsync(this, settings, strategyContext, objectParameters).ConfigureAwait(false);
        }

        #endregion
        #region ValidateAsync

        public async System.Threading.Tasks.Task<Sidvall.Data.BusinessRuleCollection> ValidateAsync()
        {
            return await global::Sidvall.IdentityManager.Security.SystemContext.Current.EntityFacade.AspNetUsersManager.ValidateAsync(this).ConfigureAwait(false);
        }
        public async System.Threading.Tasks.Task<Sidvall.Data.BusinessRuleCollection> ValidateAsync(Sidvall.Data.ValidationSettings settings)
        {
            return await global::Sidvall.IdentityManager.Security.SystemContext.Current.EntityFacade.AspNetUsersManager.ValidateAsync(this, settings).ConfigureAwait(false);
        }

        #endregion
        #region Initialize

        public void Initialize()
        {
            global::Sidvall.IdentityManager.Security.SystemContext.Current.EntityFacade.AspNetUsersManager.Initialize(this);
        }
        public void Initialize(Sidvall.Data.InitializeSettings settings)
        {
            global::Sidvall.IdentityManager.Security.SystemContext.Current.EntityFacade.AspNetUsersManager.Initialize(this, settings);
        }

        #endregion

        #region IAspNetUsers Members

        int global::Sidvall.IdentityManager.Data.IAspNetUsers.AccessFailedCount
        {
            get
            {
                return this._AccessFailedCount;
            }
            set
            {
                this._AccessFailedCount = value;
            }
        }
        string global::Sidvall.IdentityManager.Data.IAspNetUsers.Email
        {
            get
            {
                return this._Email;
            }
            set
            {
                this._Email = value;
            }
        }
        bool global::Sidvall.IdentityManager.Data.IAspNetUsers.EmailConfirmed
        {
            get
            {
                return this._EmailConfirmed;
            }
            set
            {
                this._EmailConfirmed = value;
            }
        }
        string global::Sidvall.IdentityManager.Data.IAspNetUsers.Id
        {
            get
            {
                return this._Id;
            }
            set
            {
                this._Id = value;
            }
        }
        bool global::Sidvall.IdentityManager.Data.IAspNetUsers.LockoutEnabled
        {
            get
            {
                return this._LockoutEnabled;
            }
            set
            {
                this._LockoutEnabled = value;
            }
        }
        System.Nullable<System.DateTime> global::Sidvall.IdentityManager.Data.IAspNetUsers.LockoutEndDateUtc
        {
            get
            {
                return this._LockoutEndDateUtc;
            }
            set
            {
                this._LockoutEndDateUtc = value;
            }
        }
        string global::Sidvall.IdentityManager.Data.IAspNetUsers.PasswordHash
        {
            get
            {
                return this._PasswordHash;
            }
            set
            {
                this._PasswordHash = value;
            }
        }
        string global::Sidvall.IdentityManager.Data.IAspNetUsers.PhoneNumber
        {
            get
            {
                return this._PhoneNumber;
            }
            set
            {
                this._PhoneNumber = value;
            }
        }
        bool global::Sidvall.IdentityManager.Data.IAspNetUsers.PhoneNumberConfirmed
        {
            get
            {
                return this._PhoneNumberConfirmed;
            }
            set
            {
                this._PhoneNumberConfirmed = value;
            }
        }
        string global::Sidvall.IdentityManager.Data.IAspNetUsers.SecurityStamp
        {
            get
            {
                return this._SecurityStamp;
            }
            set
            {
                this._SecurityStamp = value;
            }
        }
        bool global::Sidvall.IdentityManager.Data.IAspNetUsers.TwoFactorEnabled
        {
            get
            {
                return this._TwoFactorEnabled;
            }
            set
            {
                this._TwoFactorEnabled = value;
            }
        }
        string global::Sidvall.IdentityManager.Data.IAspNetUsers.UserName
        {
            get
            {
                return this._UserName;
            }
            set
            {
                this._UserName = value;
            }
        }
        System.Collections.Generic.IEnumerable<global::Sidvall.IdentityManager.Data.IAspNetRoles> global::Sidvall.IdentityManager.Data.IAspNetUsers.AspNetRoles
        {
            get
            {
                if (this.AspNetRoles != null)
                    return this.AspNetRoles.Items;
                return null;
            }
        }
        void global::Sidvall.IdentityManager.Data.IAspNetUsers.SetAspNetRoles(Sidvall.Data.IDataRowProvider<global::Sidvall.IdentityManager.Data.IAspNetRoles> items)
        {
            this.AspNetRoles = (AspNetRolesCollectionItem)items;
        }
        System.Collections.Generic.IEnumerable<global::Sidvall.IdentityManager.Data.IAspNetUserClaims> global::Sidvall.IdentityManager.Data.IAspNetUsers.AspNetUserClaims
        {
            get
            {
                if (this.AspNetUserClaims != null)
                    return this.AspNetUserClaims.Items;
                return null;
            }
        }
        void global::Sidvall.IdentityManager.Data.IAspNetUsers.SetAspNetUserClaims(Sidvall.Data.IDataRowProvider<global::Sidvall.IdentityManager.Data.IAspNetUserClaims> items)
        {
            this.AspNetUserClaims = (AspNetUserClaimsCollectionItem)items;
        }
        System.Collections.Generic.IEnumerable<global::Sidvall.IdentityManager.Data.IAspNetUserLogins> global::Sidvall.IdentityManager.Data.IAspNetUsers.AspNetUserLogins
        {
            get
            {
                if (this.AspNetUserLogins != null)
                    return this.AspNetUserLogins.Items;
                return null;
            }
        }
        void global::Sidvall.IdentityManager.Data.IAspNetUsers.SetAspNetUserLogins(Sidvall.Data.IDataRowProvider<global::Sidvall.IdentityManager.Data.IAspNetUserLogins> items)
        {
            this.AspNetUserLogins = (AspNetUserLoginsCollectionItem)items;
        }

        #endregion

        #endregion
        #region Constructors

        public AspNetUsers()
        {
        }
        public AspNetUsers(bool initializeDefaultValues)
            : this(initializeDefaultValues, null, Sidvall.Business.BusinessEvents.None)
        {
        }
        public AspNetUsers(bool initializeDefaultValues, Sidvall.Data.DataRowState? dataRowState, Sidvall.Business.BusinessEvents enabledBusinessEvents)
            : base(dataRowState, enabledBusinessEvents)
        {
            if (initializeDefaultValues)
                global::Sidvall.IdentityManager.Security.SystemContext.Current.EntityFacade.AspNetUsersManager.Initialize(this);
        }

        #endregion
    }
}